package cn.cs.mapper;

import cn.cs.pojo.QgTrade;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface QgTradeMapper {

	public QgTrade getQgTradeById(@Param(value = "id") Long id)throws Exception;

	public List<QgTrade>	getQgTradeListByMap(Map<String, Object> param)throws Exception;

	public Integer getQgTradeCountByMap(Map<String, Object> param)throws Exception;

	public Integer insertQgTrade(QgTrade qgTrade)throws Exception;

	public Integer updateQgTrade(QgTrade qgTrade)throws Exception;

	public Integer deleteQgTradeById(@Param(value = "id") Long id)throws Exception;

	//获取充值记录订单
	public Map<String, Object> getAccountDetailById(@Param(value = "id") String id)throws Exception;
	//获取维修订单
	public Map<String, Object> getOrderById(@Param(value = "id") String id)throws Exception;
	//获取检测报告订单
	public Map<String, Object> getTestReportById(@Param(value = "id") String id)throws Exception;

	//获取用户信息
	public Map<String, Object> getClientUserById(@Param(value = "id") String id)throws Exception;

	//支付成功修改用户金额
	public Integer updateUserBalance(@Param(value = "id") String id, @Param(value = "balance") String balance)throws Exception;
	//支付成功修改充值订单状态
	public Integer updateAccountStatus(@Param(value = "id") String id, @Param(value = "newAmonut") Double newAmonut)throws Exception;
	//支付成功修改维修订单状态
	public Integer updateOrderStatus(@Param(value = "id") String id, @Param(value = "app_order_id") String app_order_id)throws Exception;

	//支付成功修改检测报告订单状态
	public Integer updateTestReportStatus(@Param(value = "rep_order_id") String rep_order_id, @Param(value = "app_order_id") String app_order_id, @Param(value = "id") String id)throws Exception;

	public Integer updateUserOrderNumber(@Param(value = "id") String id)throws Exception;

	public Integer updateRepOrderStatusMoney(Map<String, Object> param)throws Exception;

	public Map<String, Object> getRepairPercentage()throws Exception;

	public List<Map<String, Object>> getOrderByRepUserId(@Param(value = "rep_user_id") String rep_user_id)throws Exception;

	public Integer updateMoneyByType(@Param(value = "money") String money, @Param(value = "type") String type) throws Exception;

	public Map<String, Object> getFundsAccountByType(@Param(value = "type") String type)throws Exception;

	public Integer saveFundsCarryOver(Map<String, Object> map)throws Exception;

	public List<Map<String, Object>> getFundsCarryOverByType(@Param(value = "type") String type)throws Exception;


}
